package com.example.personnel_oa.service.impl;
//service 接口 服务层
import com.example.comment_oa.pojos.Mobility;
import com.example.personnel_oa.mapper.MobilityMapper;
import com.example.personnel_oa.service.MobilityService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import java.util.List;

/**
* @author HUAWEI
* @description 针对表【mobility】的数据库操作Service实现
* @createDate 2022-10-19 15:06:37
*/
@Service
public class MobilityServiceImpl implements MobilityService {
    @Autowired//Spring对组件自动装配（Spring通过依赖注入通过IOC容器中各种组件的依赖关系赋值）的方法
    MobilityMapper mobilityMapper;

    @Override
    public List<Mobility> Methods_mob(){
        List<Mobility> mobilitys = mobilityMapper.Methods_mob();
        return mobilitys;
    }
    @Override
    public int addmob(Mobility mobility){
        int i = mobilityMapper.addmob(mobility);
        if (i<0){
            return 0;
        }else {
            return 2;
        }

    }
}




